﻿using System;
using System.Text;
using YookingBizWQW.Class.Public;
using YookingFileIO.Class;
using YookingSvrDBCall.Class.DBLogic;
using YookingSvrDBCall.Class.DBPub;

namespace YookingBizWQW.Class.Credit.mp
{
    public class clsCrMyData
    {
        //注释：王庆文 2020年03月12日===================================================
        //查询指定平台服务商中，指定ID的会员基本信息
        public string GetMemberInfo(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台单位编码
            string strCondition = "1=1";   //会员信息查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 2)
            {
                strUnitCode = strArray[0];
                strCondition = strArray[1];
            }

            #endregion

            #region 生成查询记录的SQL语句

            clsDBSpace mySpace = new clsDBSpace(); //字典表空间名
            string strDictSapace = mySpace.GetDBSpaceName("Dict");

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("     T.UNITCODE, ");
            sbQuerySQL.AppendLine(" 	T.GPID, ");
            sbQuerySQL.AppendLine(" 	T.PID, ");
            sbQuerySQL.AppendLine(" 	T.MID, ");
            sbQuerySQL.AppendLine(" 	T.MEMBERLEVEL AS MEMBERLEVELCODE, ");
            sbQuerySQL.AppendLine(" 	A.LEVELMEMO AS MEMBERLEVELNAME, ");
            sbQuerySQL.AppendLine(" 	T.INVITECODE, ");
            sbQuerySQL.AppendLine(" 	T.ISBINDCARD, ");
            sbQuerySQL.AppendLine(" 	T.ISREALNAME, ");
            sbQuerySQL.AppendLine(" 	T.MBRUPDTIME, ");
            sbQuerySQL.AppendLine(" 	T.MBRUPDWAY AS MBRUPDWAYCODE, ");
            sbQuerySQL.AppendLine(" 	B.DICTMEMO AS MBRUPDWAYNAME, ");
            sbQuerySQL.AppendLine(" 	T.REALBINDCOUNT, ");
            sbQuerySQL.AppendLine(" 	T.VIRTBINDCOUNT, ");
            sbQuerySQL.AppendLine(" 	T.OTHERMEMO ");
            sbQuerySQL.AppendLine(" FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" LEFT JOIN XYK_MEMBER_LEVEL A ON A.LEVELCODE = T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".DICT_XYK_MBRUPDWAY B ON B.DICTCODE = T.MBRUPDWAY ");
            sbQuerySQL.AppendLine(" WHERE ");
            sbQuerySQL.AppendLine("     " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" AND " + strCondition);

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月14日===================================================
        //检查指定平台服务商中，指定手机号码的会员是否已经存在
        public string CheckMemberIsExist(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台单位编码
            string strPersonID = "000000"; //人员手机号码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 2)
            {
                strUnitCode = strArray[0];
                strPersonID = strArray[1];
            }

            #endregion

            #region 生成查询记录的SQL语句

            clsDBSpace mySpace = new clsDBSpace(); //字典表空间名
            string strDictSapace = mySpace.GetDBSpaceName("Dict");

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT T.MID FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" LEFT JOIN SA_ORG_PERSONINFO A ON A.PERSONCODE = T.MID ");
            sbQuerySQL.AppendLine(" WHERE ");
            sbQuerySQL.AppendLine("     " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" AND A.PERSONID = '" + strPersonID + "' ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月12日=======================================================
        //查询指定ID或者编码的个人详细信息
        public string GetPersonInfo(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strPersonCode = "ABD000"; //人员编码
            string strPersonID = "00000000"; //人员ID

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 2)
            {
                strPersonCode = strArray[0];
                strPersonID = strArray[1];
            }

            #endregion

            #region 生成查询记录的SQL语句

            clsDBSpace mySpace = new clsDBSpace(); //字典表空间名
            string strDictSapace = mySpace.GetDBSpaceName("Dict");

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine(" 	t.PERSONCODE, ");       //人员编号
            sbQuerySQL.AppendLine(" 	t.PERSONID, ");         //人员ID
            sbQuerySQL.AppendLine(" 	t.ISLOGINUSER, ");      //是否置为登录用户
            sbQuerySQL.AppendLine(" 	t.UKSERIALNUMBER, ");   //UK序列号
            sbQuerySQL.AppendLine(" 	t.CASERIALNUMBER, ");   //CA序列号
            sbQuerySQL.AppendLine(" 	t.REQUESTKEY, ");       //客户端请求KEY
            sbQuerySQL.AppendLine(" 	t.REQUESTIP, ");        //客户端限制IP
            sbQuerySQL.AppendLine(" 	t.MOBILEPHONEIMEI, ");  //手机串号
            sbQuerySQL.AppendLine(" 	t.MOBILENUMBER, ");     //手机号码
            sbQuerySQL.AppendLine(" 	t.IDLASTCODE, ");       //身份证尾号   
            sbQuerySQL.AppendLine(" 	t.IDCARDNUMBER, ");     //身份证号码
            sbQuerySQL.AppendLine(" 	t.WORKNUMBER, ");       //工作证号
            sbQuerySQL.AppendLine(" 	t.WORKCODE, ");         //工作编码
            sbQuerySQL.AppendLine(" 	t.FATHERNAME, ");       //父亲姓名
            sbQuerySQL.AppendLine(" 	t.PERSONNAME, ");       //本人姓名
            sbQuerySQL.AppendLine(" 	t.SEXTYPE AS SEXCODE, ");     //性别代码
            sbQuerySQL.AppendLine(" 	b.DICTMEMO AS SEXNAME, ");    //性别描述
            sbQuerySQL.AppendLine(" 	t.NATION AS NATIONCODE, ");   //民族代码
            sbQuerySQL.AppendLine(" 	c.DICTMEMO AS NATIONNAME, "); //民族描述
            sbQuerySQL.AppendLine(" 	t.BIRTHDAY, ");         //出生日期
            sbQuerySQL.AppendLine(" 	t.IDCARDADDRESS, ");    //户籍地址
            sbQuerySQL.AppendLine(" 	t.LIVEADDRESS, ");      //居住地址
            sbQuerySQL.AppendLine(" 	t.EDU_DEGREE AS EDU_DEGREECODE, "); //文化程度代码
            sbQuerySQL.AppendLine(" 	d.DICTMEMO AS EDU_DEGREENAME, ");   //文化程度描述
            sbQuerySQL.AppendLine(" 	t.EDU_FINISHSCHOOL, "); //毕业学校
            sbQuerySQL.AppendLine(" 	t.EDU_FINISHDATE, ");   //毕业年月
            sbQuerySQL.AppendLine(" 	t.EDU_PROFESSION, ");   //所学专业
            sbQuerySQL.AppendLine(" 	t.PHONENUMBER, ");      //联系固话
            sbQuerySQL.AppendLine(" 	t.NETNICKNAME, ");      //网络昵称       
            sbQuerySQL.AppendLine(" 	t.QQNUMBER, ");         //QQ号码        
            sbQuerySQL.AppendLine(" 	t.MICRONUMBER, ");      //微信号码       
            sbQuerySQL.AppendLine(" 	t.MSNNUMBER, ");        //MSN号码
            sbQuerySQL.AppendLine(" 	t.EMAIL, ");            //电子邮件
            sbQuerySQL.AppendLine(" 	t.INTRODUCE, ");        //个人简历
            sbQuerySQL.AppendLine(" 	t.MEMBERTYPE, ");       //会员类型
            sbQuerySQL.AppendLine(" 	a.IMAGEENTITY AS PERSONICON "); //头像照片
            sbQuerySQL.AppendLine(" FROM SA_ORG_PERSONINFO t ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		MAINTABLERECORDID, ");
            sbQuerySQL.AppendLine(" 		SPECIALRELATENUMBER, ");
            sbQuerySQL.AppendLine(" 		IMAGEENTITY ");
            sbQuerySQL.AppendLine(" 	FROM MDA_PUBLICIMAGE ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND UPPER(MAINTABLEDEFINEID) = 'SA_ORG_PERSONINFO' ");
            sbQuerySQL.AppendLine(" 	AND IMAGETYPE='009' ");
            sbQuerySQL.AppendLine(" 	AND ORDERNUM = '0' ");
            sbQuerySQL.AppendLine(" ) a ON a.MAINTABLERECORDID = t.SYS_RECORDID AND a.SPECIALRELATENUMBER = t.PERSONCODE ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".DICT_XB b ON b.DICTCODE = t.SEXTYPE ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".DICT_MZ c ON c.DICTCODE = t.NATION ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".DICT_WHCD d ON d.DICTCODE = t.EDU_DEGREE ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "t.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND (t.PERSONCODE='" + strPersonCode + "' or t.PERSONID='" + strPersonID + "') ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月14日===================================================
        //获取指定信用卡平台，当前邀请码的最大值。（新注册的用户邀请码 = 最大值 + 1）
        public string GetMaxInviteCode(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台单位编码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 1)
            {
                strUnitCode = strArray[0];
            }

            #endregion

            #region 生成查询记录的SQL语句

            clsDBSpace mySpace = new clsDBSpace(); //字典表空间名
            string strDictSapace = mySpace.GetDBSpaceName("Dict");

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT  MAX(INVITECODE) as MAXINVITECODE ");
            sbQuerySQL.AppendLine(" FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月12日===================================================
        //查询订单交易费率字典数据
        public string GetTradeFeeRate(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 1)
            {
                strUnitCode = strArray[0];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("     UNITCODE, ");
            sbQuerySQL.AppendLine("     POS01FEERATE, ");
            sbQuerySQL.AppendLine("     POS01FEEFIX, ");
            sbQuerySQL.AppendLine("     POS02FEERATE, ");
            sbQuerySQL.AppendLine("     POS02FEEFIX, ");
            sbQuerySQL.AppendLine("     ATM01FEERATE, ");
            sbQuerySQL.AppendLine("     ATM01FEEFIX, ");
            sbQuerySQL.AppendLine("     HBEI01FEERATE, ");
            sbQuerySQL.AppendLine("     HBEI01FEEFIX, ");
            sbQuerySQL.AppendLine("     HBEI02FEERATE, ");
            sbQuerySQL.AppendLine("     HBEI02FEEFIX, ");
            sbQuerySQL.AppendLine("     OTHERMEMO ");
            sbQuerySQL.AppendLine(" FROM XYK_TRADEFEERATE T ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月12日===================================================
        //查询会员级别字典数据
        public string GetMemberLevel(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 1)
            {
                strUnitCode = strArray[0];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("     UNITCODE, ");
            sbQuerySQL.AppendLine("     LEVELCODE, ");
            sbQuerySQL.AppendLine("     LEVELMEMO, ");
            sbQuerySQL.AppendLine("     FEEAMOUNT, ");
            sbQuerySQL.AppendLine("     MINCHILDCOUNT, ");
            sbQuerySQL.AppendLine("     MAXCHILDCOUNT, ");
            sbQuerySQL.AppendLine("     OTHERMEMO ");
            sbQuerySQL.AppendLine(" FROM XYK_MEMBER_LEVEL T ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" ORDER BY LEVELCODE ASC ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年04月13日===================================================
        //查询会员升级奖励方案字典数据
        public string GetMemberUpdReward(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 1)
            {
                strUnitCode = strArray[0];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("     UNITCODE, ");
            sbQuerySQL.AppendLine("     MEMBERLEVEL, ");
            sbQuerySQL.AppendLine("     BINDFEE, ");
            sbQuerySQL.AppendLine("     A00FEE, ");
            sbQuerySQL.AppendLine("     A01FEE, ");
            sbQuerySQL.AppendLine("     A02FEE, ");
            sbQuerySQL.AppendLine("     A03FEE, ");
            sbQuerySQL.AppendLine("     B00FEE, ");
            sbQuerySQL.AppendLine("     B01FEE, ");
            sbQuerySQL.AppendLine("     B02FEE, ");
            sbQuerySQL.AppendLine("     B03FEE, ");
            sbQuerySQL.AppendLine("     OTHERMEMO ");
            sbQuerySQL.AppendLine(" FROM XYK_MEMBER_UPDREWARD T ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" ORDER BY MEMBERLEVEL ASC ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月12日===================================================
        //查询会员佣金分配方案字典数据
        public string GetMemberBkgePlan(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 1)
            {
                strUnitCode = strArray[0];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("     UNITCODE, ");
            sbQuerySQL.AppendLine("     MEMBERLEVEL, ");
            sbQuerySQL.AppendLine("     POSDISCOUNT, ");
            sbQuerySQL.AppendLine("     ATMDISCOUNT, ");
            sbQuerySQL.AppendLine("     HBEIDISCOUNT, ");
            sbQuerySQL.AppendLine("     ABKGERATE, ");
            sbQuerySQL.AppendLine("     BBKGERATE, ");
            sbQuerySQL.AppendLine("     OTHERMEMO ");
            sbQuerySQL.AppendLine(" FROM XYK_MEMBER_BKGEPLAN T ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" ORDER BY MEMBERLEVEL ASC ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月15日===================================================
        //查询会员佣金所得总额度
        public string GetMemberBkgeSumAmount(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码
            string strMID = "00000000000"; //会员编码
            string strCondition = "1=1";   //附加查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 3)
            {
                strUnitCode = strArray[0];
                strMID = strArray[1];
                strCondition = strArray[2];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("     SUM(T.BKGEAMOUNT) AS ALLAMOUNT ");
            sbQuerySQL.AppendLine(" FROM ");
            sbQuerySQL.AppendLine("     XYK_INCOME_BILL T ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.ISSUCCESS = '1' "); //0=返佣失败，1=返佣成功
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" AND T.RECECODE = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" AND " + strCondition);

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw_clsCrMyData_GetMemberBkgeSumAmount.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月15日===================================================
        //查询会员佣金提现计划信息
        public string GetMbrCashoutPlan(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码
            string strMID = "00000000000"; //会员编码
            string strCondition = "1=1";   //附加查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 3)
            {
                strUnitCode = strArray[0];
                strMID = strArray[1];
                strCondition = strArray[2];
            }

            #endregion

            #region 生成查询记录的SQL语句

            clsDBSpace mySpace = new clsDBSpace(); //表空间名
            string strSysSapace = mySpace.GetDBSpaceName("Sys");
            string strDictSapace = mySpace.GetDBSpaceName("Dict");

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine(" 	T.UNITCODE, ");
            sbQuerySQL.AppendLine(" 	T.PLANID, ");
            sbQuerySQL.AppendLine(" 	T.PLANTIME, ");
            sbQuerySQL.AppendLine(" 	T.BANKCARDNO, ");
            sbQuerySQL.AppendLine(" 	A.MOBILEPHONE, ");
            sbQuerySQL.AppendLine(" 	T.PLANAMOUNT, ");
            sbQuerySQL.AppendLine(" 	A.BANKCODE, ");
            sbQuerySQL.AppendLine(" 	G.DICTMEMO AS BANKNAME, ");
            sbQuerySQL.AppendLine(" 	I.IMAGEENTITY AS BANKLOGO, ");
            sbQuerySQL.AppendLine(" 	T.VERIFYUNIT AS VERIFYUNITCODE, ");
            sbQuerySQL.AppendLine(" 	B.UNITSHORTNAME AS VERIFYUNITNAME, ");
            sbQuerySQL.AppendLine(" 	C.PERSONCODE AS VERIFYPERSONCODE, ");
            sbQuerySQL.AppendLine(" 	T.VERIFYPERSON AS VERIFYPERSONID, ");
            sbQuerySQL.AppendLine(" 	C.PERSONNAME AS VERIFYPERSONNAME, ");
            sbQuerySQL.AppendLine(" 	T.VERIFYTIME, ");
            sbQuerySQL.AppendLine(" 	T.VERIFYRESULT AS VERIFYRESULTCODE, ");
            sbQuerySQL.AppendLine(" 	D.DICTMEMO AS VERIFYRESULTMEMO, ");
            sbQuerySQL.AppendLine(" 	T.PLANSTATE AS PLANSTATECODE, ");
            sbQuerySQL.AppendLine(" 	E.DICTMEMO AS PLANSTATENAME, ");
            sbQuerySQL.AppendLine(" 	T.MEMBERLEVEL AS MEMBERLEVELCODE, ");
            sbQuerySQL.AppendLine(" 	F.LEVELMEMO AS MEMBERLEVELMEMO, ");
            sbQuerySQL.AppendLine(" 	T.OTHERMEMO, ");
            sbQuerySQL.AppendLine(" 	T.SYS_RECORDID ");
            sbQuerySQL.AppendLine(" FROM XYK_CASHOUTPLAN T ");
            sbQuerySQL.AppendLine(" LEFT JOIN XYK_BANKCARD A ON A.CARDNO = T.BANKCARDNO ");
            sbQuerySQL.AppendLine(" LEFT JOIN SA_ORG_UNITINFO B ON B.UNITCODE = T.VERIFYUNIT ");
            sbQuerySQL.AppendLine(" LEFT JOIN SA_ORG_PERSONINFO C ON C.PERSONID = T.VERIFYPERSON ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".HOTEL_DICT_VERIFYRESULT D ON D.DICTCODE = T.VERIFYRESULT ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".DICT_XYK_TRADESTATE E ON E.DICTCODE = T.PLANSTATE ");
            sbQuerySQL.AppendLine(" LEFT JOIN XYK_MEMBER_LEVEL F ON F.LEVELCODE = T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strDictSapace + ".DICT_XYK_BANKCODE G ON G.DICTCODE = A.BANKCODE ");
            sbQuerySQL.AppendLine(" LEFT JOIN " + strSysSapace + ".DB_TABLEDEFINE H ON UPPER(H.TABLENAME) = 'DICT_XYK_BANKCODE' ");
            sbQuerySQL.AppendLine(" LEFT JOIN MDA_PUBLICIMAGE I ON ( ");
            sbQuerySQL.AppendLine(" 	UPPER(I.MAINTABLEDEFINEID) = 'DICT_XYK_BANKCODE' ");
            sbQuerySQL.AppendLine(" 	OR I.MAINTABLEDEFINEID = H.TABLEID ");
            sbQuerySQL.AppendLine(" ) ");
            sbQuerySQL.AppendLine(" AND I.MAINTABLERECORDID = G.SYS_RECORDID ");
            sbQuerySQL.AppendLine(" AND ( ");
            sbQuerySQL.AppendLine(" 	I.SPECIALRELATENUMBER = G.DICTCODE ");
            sbQuerySQL.AppendLine(" 	OR I.SPECIALRELATENUMBER = G.DICTSPELL ");
            sbQuerySQL.AppendLine(" ) ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "B.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "F.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND " + clsSQLSyntax.IsNullSQL("Data", "I.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE='" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" AND A.PERSONCODE='" + strMID + "' ");
            sbQuerySQL.AppendLine(" AND " + strCondition);
            sbQuerySQL.AppendLine(" ORDER BY T.PlanTime Desc ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw_clsCrMyData_GetMbrCashoutPlan.txt", sbQuerySQL.ToString());

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月20日=======================================================
        //统计分析不同级别的会员数据，包括会员数量、佣金额度等信息
        public string Olap_MemberBrokerage_Data(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码
            string strMID = "00000000000"; //会员编码
            string strCondition = "1=1";   //附加查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 3)
            {
                strUnitCode = strArray[0];
                strMID = strArray[1];
                strCondition = strArray[2];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine(" 	T.LEVELCODE, /*会员代码*/ ");
            sbQuerySQL.AppendLine(" 	T.LEVELMEMO, /*会员级别*/ ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJYJHYRS, 0) YJYJHYRS, /*一级代理会员人数*/ ");
            sbQuerySQL.AppendLine(" 	ROUND(IFNULL(YJYJJESUM, '0'), 2) YJYJJESUM, /*一级代理佣金额度*/ ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJHYZRS, 0) YJHYZRS, /*一级代理总人数*/ ");
            sbQuerySQL.AppendLine(" 	ROUND(IFNULL(YJYJZSUM, '0'), 2) YJYJZSUM, /*一级代理总佣金*/ ");
            sbQuerySQL.AppendLine(" 	IFNULL(EJYJHYRS, 0) EJYJHYRS, /*二级代理会员人数*/ ");
            sbQuerySQL.AppendLine(" 	ROUND(IFNULL(EJYJJESUM, '0'), 2) EJYJJESUM, /*二级代理佣金额度*/ ");
            sbQuerySQL.AppendLine(" 	IFNULL(EJHYZRS, 0) EJHYZRS, /*二级代理总人数*/ ");
            sbQuerySQL.AppendLine(" 	ROUND(IFNULL(EJYJZSUM, '0'), 2) EJYJZSUM, /*二级代理总佣金*/ ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJHYZRS + EJHYZRS, 0) ZRS, /*总人数*/ ");
            sbQuerySQL.AppendLine(" 	ROUND(IFNULL(YJYJZSUM, '0') + IFNULL(EJYJZSUM, '0'),2) ZSUM /*佣金总额*/ ");
            sbQuerySQL.AppendLine(" FROM XYK_MEMBER_LEVEL T ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) YJYJHYRS ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" ) A ON T.LEVELCODE = A.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine(" 		SUM(BKGEAMOUNT) YJYJJESUM ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND A.BKGETYPE = '01' ");
            sbQuerySQL.AppendLine(" 	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" ) B ON T.LEVELCODE = B.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) EJYJHYRS ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" ) C ON T.LEVELCODE = C.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine(" 		SUM(BKGEAMOUNT) EJYJJESUM ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND A.BKGETYPE = '02' ");
            sbQuerySQL.AppendLine(" 	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" ) D ON T.LEVELCODE = D.MEMBERLEVEL ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		COUNT(*) YJHYZRS ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" ) E ON 1=1 ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		COUNT(*) EJHYZRS ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" ) F ON 1=1 ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		SUM(BKGEAMOUNT) YJYJZSUM ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND A.BKGETYPE = '01' ");
            sbQuerySQL.AppendLine(" 	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine(" ) G ON 1=1 ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		SUM(BKGEAMOUNT) EJYJZSUM ");
            sbQuerySQL.AppendLine(" 	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine(" 	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine(" 	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 	AND A.BKGETYPE = '02' ");
            sbQuerySQL.AppendLine(" 	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine(" ) H ON 1=1 ");
            sbQuerySQL.AppendLine(" WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" AND " + strCondition + " /*此处添加其他附加条件*/ ");
            sbQuerySQL.AppendLine(" ORDER BY T.LEVELCODE ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "pz_clsCrMyData_Olap_MemberBrokerage_Data.txt", sbQuerySQL.ToString(), false);

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年04月20日=======================================================
        //统计分析不同级别的会员当月的数据，包括当月会员数量、当月佣金额度等信息
        public string Olap_MemberBrokerage_Month(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码
            string strMID = "00000000000"; //会员编码
            string strCondition = "1=1";   //附加查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 3)
            {
                strUnitCode = strArray[0];
                strMID = strArray[1];
                strCondition = strArray[2];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("  	T.LEVELCODE, /*会员代码*/ ");
            sbQuerySQL.AppendLine("  	T.LEVELMEMO, /*会员级别*/ ");
            sbQuerySQL.AppendLine("  	IFNULL(YJYJHYRS, 0) BYYJYJHYRS, /*本月一级代理佣金会员人数*/ ");
            sbQuerySQL.AppendLine("  	ROUND(IFNULL(YJYJJESUM, '0'), 2) BYYJYJJESUM, /*本月一级代理佣金会员额度*/ ");
            sbQuerySQL.AppendLine("  	IFNULL(YJHYZRS, 0) BYYJHYZRS, /*本月一级代理全部总人数*/ ");
            sbQuerySQL.AppendLine("  	ROUND(IFNULL(YJYJZSUM, '0'), 2) BYYJYJZSUM, /*本月一级代理全部总佣金*/ ");
            sbQuerySQL.AppendLine("  	IFNULL(EJYJHYRS, 0) BYEJYJHYRS, /*本月二级代理佣金会员人数*/ ");
            sbQuerySQL.AppendLine("  	ROUND(IFNULL(EJYJJESUM, '0'), 2) BYEJYJJESUM, /*本月二级代理佣金会员额度*/ ");
            sbQuerySQL.AppendLine("  	IFNULL(EJHYZRS, 0) BYEJHYZRS, /*本月二级代理全部总人数*/ ");
            sbQuerySQL.AppendLine("  	ROUND(IFNULL(EJYJZSUM, '0'), 2) BYEJYJZSUM /*本月二级代理全部总佣金*/ ");
            sbQuerySQL.AppendLine("  FROM XYK_MEMBER_LEVEL T ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine("  		COUNT(*) YJYJHYRS ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(MBRUPDTIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  ) A ON T.LEVELCODE = A.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine("  		SUM(BKGEAMOUNT) YJYJJESUM ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND A.BKGETYPE = '01' ");
            sbQuerySQL.AppendLine("  	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(BKGETIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  ) B ON T.LEVELCODE = B.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine("  		COUNT(*) EJYJHYRS ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(MBRUPDTIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  ) C ON T.LEVELCODE = C.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		T.MEMBERLEVEL, ");
            sbQuerySQL.AppendLine("  		SUM(BKGEAMOUNT) EJYJJESUM ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND A.BKGETYPE = '02' ");
            sbQuerySQL.AppendLine("  	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(BKGETIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  	GROUP BY T.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  ) D ON T.LEVELCODE = D.MEMBERLEVEL ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		COUNT(*) YJHYZRS ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(MBRUPDTIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  ) E ON 1=1 ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		COUNT(*) EJHYZRS ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	AND (T.ISBINDCARD='1' OR T.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(MBRUPDTIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  ) F ON 1=1 ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		SUM(BKGEAMOUNT) YJYJZSUM ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND A.BKGETYPE = '01' ");
            sbQuerySQL.AppendLine("  	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(BKGETIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  ) G ON 1=1 ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("  		SUM(BKGEAMOUNT) EJYJZSUM ");
            sbQuerySQL.AppendLine("  	FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  	LEFT JOIN XYK_INCOME_BILL A ON T.MID = A.GIVECODE ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  	AND T.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND T.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine("  	AND A.BKGETYPE = '02' ");
            sbQuerySQL.AppendLine("  	AND A.ISSUCCESS = '1' ");
            sbQuerySQL.AppendLine("   AND DATE_FORMAT(BKGETIME,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') ");
            sbQuerySQL.AppendLine("  ) H ON 1=1 ");
            sbQuerySQL.AppendLine("  WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  AND T.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  AND " + strCondition + " /*此处添加其他附加条件*/ ");
            sbQuerySQL.AppendLine("  ORDER BY T.LEVELCODE ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "pz_clsCrMyData_Olap_MemberBrokerage_Month.txt", sbQuerySQL.ToString(), false);

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年04月19日=========================================================
        //按月度解析每个月至少有一次用卡记录的会员人数情况，并显示在eChart折线图上
        public string Olap_MemberActiveCount_Data(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码
            string strMID = "00000000000"; //会员编码
            string strCondition = "1=1";   //附加查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 3)
            {
                strUnitCode = strArray[0];
                strMID = strArray[1];
                strCondition = strArray[2];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine(" 	A.OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJ_LEVEL00, '0') YJ_LEVEL00, ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJ_LEVEL01, '0') YJ_LEVEL01, ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJ_LEVEL02, '0') YJ_LEVEL02, ");
            sbQuerySQL.AppendLine(" 	IFNULL(YJ_LEVEL03, '0') YJ_LEVEL03, ");
            sbQuerySQL.AppendLine(" 	IFNULL(EJ_LEVEL00, '0') EJ_LEVEL00, ");
            sbQuerySQL.AppendLine(" 	IFNULL(EJ_LEVEL01, '0') EJ_LEVEL01, ");
            sbQuerySQL.AppendLine(" 	IFNULL(EJ_LEVEL02, '0') EJ_LEVEL02, ");
            sbQuerySQL.AppendLine(" 	IFNULL(EJ_LEVEL03, '0') EJ_LEVEL03 ");
            sbQuerySQL.AppendLine(" FROM ");
            sbQuerySQL.AppendLine(" 	( ");
            sbQuerySQL.AppendLine("     SELECT DISTINCT '01' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '02' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '03' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '04' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '05' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '06' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '07' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '08' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '09' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '10' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '11' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 		UNION SELECT '12' OLAPMONTH FROM XYK_REPAYPLAN ");
            sbQuerySQL.AppendLine(" 	) A ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) YJ_LEVEL00 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '00' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) B ON A.OLAPMONTH = B.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) YJ_LEVEL01 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '01' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) C ON A.OLAPMONTH = C.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) YJ_LEVEL02 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '02' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) D ON A.OLAPMONTH = D.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) YJ_LEVEL03 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '03' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) E ON A.OLAPMONTH = E.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) EJ_LEVEL00 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '00' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine("  			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) F ON A.OLAPMONTH = F.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) EJ_LEVEL01 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '01' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) G ON A.OLAPMONTH = G.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) EJ_LEVEL02 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '02' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) M ON A.OLAPMONTH = M.OLAPMONTH ");
            sbQuerySQL.AppendLine(" LEFT JOIN ( ");
            sbQuerySQL.AppendLine(" 	SELECT ");
            sbQuerySQL.AppendLine(" 		OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 		COUNT(*) EJ_LEVEL03 ");
            sbQuerySQL.AppendLine(" 	FROM ");
            sbQuerySQL.AppendLine(" 		( ");
            sbQuerySQL.AppendLine(" 			SELECT ");
            sbQuerySQL.AppendLine(" 				C.PERSONCODE, ");
            sbQuerySQL.AppendLine(" 				SUBSTR(PLANTIME, 6, 2) OLAPMONTH, ");
            sbQuerySQL.AppendLine(" 				COUNT(*) CS ");
            sbQuerySQL.AppendLine(" 			FROM XYK_MEMBER_INFO A ");
            sbQuerySQL.AppendLine(" 			LEFT JOIN XYK_REPAYPLAN C ON A.UNITCODE = C.UNITCODE ");
            sbQuerySQL.AppendLine(" 			AND A.MID = C.PERSONCODE ");
            sbQuerySQL.AppendLine(" 			WHERE " + clsSQLSyntax.IsNullSQL("Data", "A.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 			AND " + clsSQLSyntax.IsNullSQL("Data", "C.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine(" 	        AND (A.ISBINDCARD='1' OR A.MEMBERLEVEL!='00') "); //只计算绑卡的人，或非普通会员
            sbQuerySQL.AppendLine(" 			AND A.UNITCODE = '" + strUnitCode + "' ");
            sbQuerySQL.AppendLine(" 			AND A.GPID = '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND A.PID <> '" + strMID + "' ");
            sbQuerySQL.AppendLine(" 			AND C.MEMBERLEVEL = '03' ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME >= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-01-01 00:00:00') ");
            sbQuerySQL.AppendLine(" 			AND PLANTIME <= CONCAT(DATE_FORMAT(NOW(), '%Y'),'-12-31 23:59:59') ");
            sbQuerySQL.AppendLine(" 			GROUP BY C.PERSONCODE,SUBSTR(PLANTIME, 6, 2) ");
            sbQuerySQL.AppendLine(" 		) S ");
            sbQuerySQL.AppendLine(" 	WHERE S.CS >= '1' ");
            sbQuerySQL.AppendLine(" 	GROUP BY OLAPMONTH ");
            sbQuerySQL.AppendLine(" ) N ON A.OLAPMONTH = N.OLAPMONTH ");
            sbQuerySQL.AppendLine(" ORDER BY A.OLAPMONTH ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "pz_clsCrMyData_Olap_MemberActiveCount_Data.txt", sbQuerySQL.ToString(),false);

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年03月20日=====================================================================
        //统计分析不同级别的每一名会员的详细数据，包括姓名、手机号、是否绑卡、充值情况、还款情况等信息
        public string Get_MemberRepay_Detail(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strUnitCode = "CHN000"; //平台平台编码
            string strMID = "00000000";    //会员ID
            string strLevelCode = "00";    //会员级别代码
            string strCondition = "1=1";   //附加查询条件

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 4)
            {
                strUnitCode = strArray[0];
                strMID = strArray[1];
                strLevelCode = strArray[2];
                strCondition = strArray[3];
            }

            #endregion

            #region 生成查询记录的SQL语句

            clsDBSpace mySpace = new clsDBSpace(); //表空间名
            string strDictSapace = mySpace.GetDBSpaceName("Dict");

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT ");
            sbQuerySQL.AppendLine("  	T.MID, ");
            sbQuerySQL.AppendLine("  	T.MBRUPDTIME, ");
            sbQuerySQL.AppendLine("  	N.PERSONNAME, ");
            sbQuerySQL.AppendLine("  	N.MOBILENUMBER, ");
            sbQuerySQL.AppendLine("  	M.DICTMEMO, ");
            sbQuerySQL.AppendLine("  	ROUND(IFNULL(CZYJ, '0'), 2) CZYJ, ");
            sbQuerySQL.AppendLine("  	ROUND(IFNULL(HKYJ, '0'), 2) HKYJ ");
            sbQuerySQL.AppendLine("  FROM XYK_MEMBER_INFO T ");
            sbQuerySQL.AppendLine("  LEFT JOIN " + strDictSapace + ".DICT_BOOL M ON T.ISBINDCARD=M.DICTCODE ");
            sbQuerySQL.AppendLine("  LEFT JOIN SA_ORG_PERSONINFO N ON T.MID=N.PERSONCODE ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("     T.GIVECODE, ");
            sbQuerySQL.AppendLine("  		T.RECECODE, ");
            sbQuerySQL.AppendLine("  		SUM(T.BKGEAMOUNT) CZYJ ");
            sbQuerySQL.AppendLine("  	FROM XYK_INCOME_BILL T ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND T.UNITCODE='" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("     AND T.RECECODE='" + strMID + "' /*收益人是当前会员*/ ");
            sbQuerySQL.AppendLine("  	AND T.BKGEFROM='HYCZ01' ");
            sbQuerySQL.AppendLine("  	GROUP BY T.GIVECODE ");
            sbQuerySQL.AppendLine("  ) A ON T.MID=A.GIVECODE ");
            sbQuerySQL.AppendLine("  LEFT JOIN ( ");
            sbQuerySQL.AppendLine("  	SELECT ");
            sbQuerySQL.AppendLine("     T.GIVECODE, ");
            sbQuerySQL.AppendLine("  		T.RECECODE, ");
            sbQuerySQL.AppendLine("  		SUM(T.BKGEAMOUNT) HKYJ ");
            sbQuerySQL.AppendLine("  	FROM XYK_INCOME_BILL T ");
            sbQuerySQL.AppendLine("  	WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  	AND T.UNITCODE='" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("     AND T.RECECODE='" + strMID + "' /*收益人是当前会员*/ ");
            sbQuerySQL.AppendLine("  	AND T.BKGEFROM!='HYCZ01' /*充值之外的费用都算作信用卡类收入*/ ");
            sbQuerySQL.AppendLine("  	GROUP BY T.GIVECODE ");
            sbQuerySQL.AppendLine("  ) B ON T.MID=B.GIVECODE ");
            sbQuerySQL.AppendLine("  WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  AND " + clsSQLSyntax.IsNullSQL("Data", "M.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("  AND UNITCODE='" + strUnitCode + "' ");
            sbQuerySQL.AppendLine("  AND " + strCondition + " /*动态传入SQL条件*/ ");
            sbQuerySQL.AppendLine("  AND MEMBERLEVEL='" + strLevelCode + "' ");
            sbQuerySQL.AppendLine("  ORDER BY T.MBRUPDTIME DESC ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "pz_clsCrMyData_Get_MemberRepay_Detail.txt", sbQuerySQL.ToString(),false);

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }

        //注释：王庆文 2020年04月24日========================================================
        //APP用户在进行分享图片操作时，将照片数据临时存储在服务器的指定磁盘目录下面
        public string SavePhotoDataToDisk(string strB64RequestData)
        {
            string strRtData = "no operate";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strImgFileName = "test.jpg"; //图片文件名称
            string strB64ImgData = "AABBCCDD";  //图片Base64数据

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 2)
            {
                strImgFileName = strArray[0];
                strB64ImgData = strArray[1];
            }

            #endregion

            clsRWFile myFile = new clsRWFile(); //保存到磁盘上
            try
            {
                byte[] bfrByte = Convert.FromBase64String(strB64ImgData);

                string strFilePath = "/yks/netcore/app/mpClient/file";
                myFile.SaveBinaryFile(bfrByte, strFilePath, strImgFileName);

                strRtData = "save image success!";
            }
            catch (Exception ex)
            {
                strRtData = "save image failure!";

                #region 将错误日志记录到文件中

                clsRWFile myLog = new clsRWFile();
                string strLogTime = Convert.ToString(System.DateTime.Now);
                string strLogFile = "YookingBizWQW_clsCrMyData_" + System.DateTime.Now.ToString("yyyyMMdd") + ".txt";
                myLog.WriteInfoToTxtFile("SysLog", strLogFile, strLogTime + " Begin：SavePhotoDataToDisk()_Error====================================================");
                myLog.WriteInfoToTxtFile("SysLog", strLogFile, ex.Message.ToString());
                myLog.WriteInfoToTxtFile("SysLog", strLogFile, strLogTime + " End：SavePhotoDataToDisk()_Error======================================================");
                myLog.WriteInfoToTxtFile("SysLog", strLogFile, "");  //在结尾处写一个回车和空行

                #endregion
            }

            return strRtData; //图像数据的处理结果
        }

        //注释：王庆文 2020年04月27日========================================================
        //检查指定身份证号码的人员在YOOKING数据库中是否已经存在
        public string CheckIDCardNumberIsExist(string strB64RequestData)
        {
            string strRtData = "no data";

            //先进行解密，然后在进行中文解码，最后得到明文的请求数据
            string strRequestData = clsHandleData.DeUrlRequest(strB64RequestData);

            #region 将strRequestData包含的各种参数一一解析出来

            string strIDCardNumber = "0000"; //18位身份证号码

            //这些参数用★分隔开，客户端与服务器端要一致
            string[] strArray = strRequestData.Split('★');
            if (strArray.Length >= 1)
            {
                strIDCardNumber = strArray[0];
            }

            #endregion

            #region 生成查询记录的SQL语句

            StringBuilder sbQuerySQL = new StringBuilder();
            sbQuerySQL.AppendLine(" SELECT PERSONCODE,IDCARDNUMBER FROM SA_ORG_PERSONINFO T ");
            sbQuerySQL.AppendLine("   WHERE " + clsSQLSyntax.IsNullSQL("Data", "T.SYS_CANCELDATETIME"));
            sbQuerySQL.AppendLine("     AND T.IDCARDNUMBER = '" + strIDCardNumber + "' ");

            #endregion

            //clsRWFile myLog = new clsRWFile(); //将待执行的SQL语句记录下来
            //myLog.WriteInfoToTxtFile("SysLog", "wqw.txt", sbQuerySQL.ToString(),false);

            clsDbSQLLogic myDB = new clsDbSQLLogic(); //实例化数据库操作类
            strRtData = myDB.YookingExecuteJson("Data", sbQuerySQL.ToString());

            return strRtData; //数据库查询结果
        }




    }
}
